X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/6d26a6bd8b30ad893da0315655d2f68aee787515..68fb174e84f38b2d72c7a0325cbfc6dc4fe486cc:/scripts/EP1%2004.02%20Starting%20a%20Rocket_a.LACE?ds=inline diff --git a/scripts/EP1 04.02 Starting a Rocket_a.LACE b/scripts/EP1 04.02 Starting a Rocket_a.LACE new file mode 100644 index 0000000..25b0546 --- /dev/null +++ b/scripts/EP1 04.02 Starting a Rocket_a.LACE @@ -0,0 +1,33 @@ +# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. +# Approximation of gravity of earth by g +# Equation of motion +# r'' = alpha / (m0 - alpha*t) * v0 - g +# alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s +# m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg +# v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s +# g: acceleration of earth = 9,81 m/s^2 + +include CompoundFunctions.LACE # include idivide + +coefficient.1 -> alpha1 +coefficient.2(+1) -> alpha2 # == alpha1 +coefficient.3(-1) -> -m0 +coefficient.4 -> v0 +coefficient.5(+1) -> g + +# generate t-ramp +iintegrate (-1) -> t + +cmultiply (alpha1, t) -> alpha*t +isum (-m0, alpha*t) -> m0-alpha*t +idivide (alpha2, m0-alpha*t) -> -alpha/(m0-alpha*t) +cmultiply (-alpha/(m0-alpha*t), v0) -> -alpha/(m0-alpha*t)*v0 +isum(-alpha/(m0-alpha*t)*v0, g) -> alpha/(m0-alpha*t)*v0-g + +iintegrate (alpha/(m0-alpha*t)*v0-g) -> -v +invert (-v) -> v +iintegrate (-v) -> z + +output (t) -> out.x +output (v) -> out.y +output (z) -> out.z